<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
?>
<?php
$user 	=& JFactory::getUser();
if ( $user->get('guest')) {
?>

<div>
  <div class="bg_pup5">
    <div class="boder_bt p10t p5b p14l p12r ">
      <p class="text_tt3 float_left p5t p10l">Fakta-boks </p>
      <!--<p class="text_tt2 float_right"><a href="#"><img src="templates/xescort/images/bt_close.png"></a></p>--> 
      <br class="cb">
    </div>
    <div class=" p45l p17t"> Please login! </div>
  </div>
</div>
<?php	
}else{
	
?>
<div>
  <div class="bg_pup3">
    <div class="boder_bt p10t p5b p14l p12r ">
      <p class="text_tt3 float_left p5t p10l">Profil-Beskrivelse</p>
      <!--<p class="text_tt2 float_right"><a href="#"><img src="templates/xescort/images/bt_close.png"></a></p>--> 
      <br class="cb">
    </div>
    <div class="p15t p35l">
      <form action="<?php echo JRoute::_('index.php'); ?>" class="form-validate" method="post" name="registerForm" id="registerForm">
        <div class="text_calenda m10t m5b">
          <textarea rows="" cols="" name="description" id="description"><?php echo $user->get('description') ?></textarea>
        </div>
        <a href="javascript:void(0);" onclick="click_send();"><img src="templates/xescort/images/bt_gem.png" name=""></a>
        <input type="submit" name="senddescription" id="senddescription" value="Send" style="display: none;" />
        <input type="hidden" name="task" value="save" />
        <input type="hidden" name="option" value="com_user" />
        <input type="hidden" name="id" value="<?php echo $user->get('id') ?>" />
        <input type="hidden" name="gid" value="<?php echo $user->get('gid') ?>" />
        <input type="hidden" name="username" value="<?php echo $user->get('username') ?>" />
        <?php echo JHTML::_( 'form.token' ); ?>
      </form>
    </div>
  </div>
</div>
<script language="javascript">
jQuery(document).ready(function($) {	
	click_send=function(){
		document.getElementById('senddescription').click();
	}
});
</script>
<?php
}
?>
